// 全国的城市列表
module.exports = app => {
  const { INTEGER, STRING } = app.Sequelize;
  const City = app.model.define('city', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    city_name: STRING, // 城市名

  });

  City.associate = function() {
    app.model.City.hasMany(app.model.Hotel, {
      foreignKey: 'city_id',
      sourceKey: 'id',
      // as: 'hotel',
    });
  };
  return City;
};
